package com.coocaa.ops.plus.dashboard.v1.sysswitcher;

import com.coocaa.ops.common.core.base.model.R;
import com.coocaa.ops.plus.dashboard.third.internalapi.InternalApiFeignClientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author bijiahao
 * @date : 2018/4/11.
 * @description
 */
@RestController
@RequestMapping("/v1/switcher")
public class SysSwitcherController {
    @Autowired
    private InternalApiFeignClientService sysSwitcherFeignClient;

    /**
     * 开关信息
     *
     * @param type
     * @return
     */
    @RequestMapping("/getSwitcherInfo")
    public Object getSwitcherInfo(@RequestParam String type) {
        return sysSwitcherFeignClient.getSwitcherInfo(type);
    }

    /**
     * 获取所有的开关信息
     *
     * @return
     */
    @RequestMapping(value = "/getAllSwitcher", produces = "text/html;charset=UTF-8")
    public R getAllSwitcher() {
        return sysSwitcherFeignClient.getAllSwitcher();
    }


}
